package com.authManager.commons.feignApi;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.authManager.commons.feignApi.hystric.SysMenuUrlApiHystric;

import com.authManager.entity.SysMenuUrl;
import com.commons.base.model.AdminPage;
import com.commons.base.model.ResultData;

@FeignClient(value = "authManager-server", fallback = SysMenuUrlApiHystric.class)
public interface SysMenuUrlApi {
	static final String projectAaaApiBaseUrl = "/authManager-server/admin/sysMenuUrl";

	/**
	 * 添加【按钮 和 url关联表】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/saveSysMenuUrl", method = { RequestMethod.POST })
	public ResultData<Object> saveSysMenuUrl(@RequestParam(value = "sysMenuId",required = false) Long sysMenuId,
			@RequestParam(value = "requestUrl",required = false) String requestUrl);

	/**
	 * 修改【按钮 和 url关联表】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/editSysMenuUrl", method = { RequestMethod.POST })
	public ResultData<Object> editSysMenuUrl(@RequestParam(value = "sysMenuUrlId",required = true) Long sysMenuUrlId,
			@RequestParam(value = "sysMenuId",required = false) Long sysMenuId, @RequestParam(value = "requestUrl",required = false) String requestUrl);

	/**
	 * 删除【按钮 和 url关联表】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/delSysMenuUrl", method = { RequestMethod.POST })
	public ResultData<Object> delSysMenuUrl(@RequestParam(value = "sysMenuUrlId",required = true) Long sysMenuUrlId);

	/**
	 * 获取【按钮 和 url关联表】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/getSysMenuUrl", method = { RequestMethod.POST })
	public ResultData<SysMenuUrl> getSysMenuUrl(@RequestParam(value = "sysMenuUrlId",required = true) Long sysMenuUrlId);

	/**
	 * 列表【按钮 和 url关联表】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/listSysMenuUrl", method = { RequestMethod.POST })
	public ResultData<AdminPage<SysMenuUrl>> listSysMenuUrl(
			@RequestParam(value = "pageNum",defaultValue = "1", required = false) Integer pageNum,
			@RequestParam(value = "pageSize",defaultValue = "10", required = false) Integer pageSize,
			@RequestParam(value = "sysMenuUrlId",required = false) Long sysMenuUrlId, @RequestParam(value = "sysMenuId",required = false) Long sysMenuId,
			@RequestParam(value = "requestUrl",required = false) String requestUrl);
}
